<%= render 'fae/shared/index_header', title: @klass_humanized.pluralize, csv: true %>

<main class="content">
  <table class="js-sort-row">
    <thead>
      <tr>
        <th class="th-sortable-handle"></th>
        <th>Name</th>
        <th class="-action-wide">Modified</th>
        <th class="-action-wide" data-sorter="false">On Stage</th>
        <th class="-action-wide" data-sorter="false">On Prod</th>
        <th class="-action" data-sorter="false">Delete</th>
      </tr>
    </thead>

    <tbody>
      <% @items.each do |item| %>
        <tr id="<%= "#{@klass_singular}_#{item.id}" %>">
          <td class="sortable-handle">
            <i class="icon-sort"></i>
          </td>
          <td><%= link_to item.fae_display_field, edit_admin_varietal_path(item) %></td>
          <td><%= fae_date_format item.updated_at %></td>
          <td><%= fae_toggle item, :on_stage %></td>
          <td><%= fae_toggle item, :on_prod %></td>
          <td><%= fae_delete_button item %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</main>
